package casino;

import java.awt.Rectangle;
import java.awt.image.BufferedImage;

import util.CardValues;
import util.CardValues.*;


public class Card extends Rectangle{
	public Value value;
	public Suit suit;
	protected BufferedImage back = CardValues.back;
	protected int width = CardValues.width;
	public int height = CardValues.height;
	public boolean faceUp;
	public BufferedImage front;
	
	public Card(Value v, Suit s, BufferedImage f){
		super(0, 0, f.getWidth(), f.getHeight());
		value = v;
		suit = s;
		front = f;
		faceUp = false;
	}
	
	public void flip(){
		if(faceUp == true){
			faceUp = false;
		}else{
			faceUp = true;
		}
	}
	
	public void setPosition(int xPos, int yPos){
		x = xPos;
		y = yPos;
	}
	
	public int getValue(){
		return value.ordinal()+1;
	}
}
